function checkSelect1(val,obj, o) {
	var item;
	if(val==1)
	    item = document.getElementsByName('two_menu_id' + o);
	else if(val==2)
		item = document.getElementsByName('three_menu_id' + o);
	if (obj.checked == true) {
		for ( var i = 0; i < item.length; i++) {
			item[i].checked = true;
		}
	} else {
		for ( var i = 0; i < item.length; i++) {
			item[i].checked = false;
		}
	}
}
function checkSelect2(obj, o) {
	var item = document.getElementById('one_menu_id' + o);
	if (obj.checked == true) {
		item.checked = true;

	}
	var item2 = document.getElementsByName(obj.name);
	var tag = true;
	for ( var i = 0; i < item2.length; i++) {
		if (item2[i].checked) {
			tag = false;
		}
	}
	if (tag) {
		item.checked = false;
	}
}

function hasdown(){alert('该角色下有管理员，不允许删除！');}

function delIndexInfos(){
	var listsize = document.getElementById('listsize').value;
	var pkid_string = '';
	for(var i=0;i<listsize;i++){
		if(document.getElementById('checkone'+i).checked){
		    var flag = document.getElementById('hasDown'+i).value;
				if(flag == 1){	
					alert('选中的角色下有管理员，不允许删除！');
					return false;
        }
				pkid_string += document.getElementById('checkone'+i).value+'|';
		}
	}
	if(pkid_string == ''){
		alert('请至少选择一条!');
		return false;
	}
	document.getElementById('pkid').value = pkid_string;
	document.indexForm.action='/doTradeReg.do';
	if(window.confirm('确认删除吗?')){
		document.indexForm.submit();
	}
}

function delOneNews(val){
  if(window.confirm('确认删除吗？')){
 	  window.location.href='/doTradeReg.do?pkid='+val+'&bpm_id=9283'; 
  } 
 
}


